﻿namespace Devonline.Entity;

/// <summary>
/// 待办事项 字符串主键的默认实现
/// </summary>
[Table("todo"), DisplayName("待办事项")]
public class Todo : Todo<string>
{
    /// <summary>
    /// 用户个人信息
    /// </summary>
    public virtual Personal? Personal { get; set; }
}

/// <summary>
/// 待办事项
/// 待办事项基类字段提供待办事项名称, 待办对象类型和待办对象编号
/// TODO TBD 待办事项具体条目尚未确定
/// </summary>
[Table("todo"), DisplayName("待办事项")]
public class Todo<TKey> : EntitySetWithBusiness<TKey> where TKey : IConvertible
{
    /// <summary>
    /// 用户个人信息
    /// </summary>
    [Column("personal_id"), DisplayName("个人信息编号"), MaxLength(36), Excel]
    public virtual TKey? PersonalId { get; set; }
    /// <summary>
    /// 待办事项具体地址
    /// </summary>
    [Column("url"), Required, MaxLength(256), DisplayName("待办事项地址")]
    public virtual string? Url { get; set; }
}
